package com.spring_mysql_redis.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.time.LocalDateTime;

@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sp_message")
public class Message implements Serializable {

    public static final String TYPE_ADD = "TYPE_ADD";
    public static final String TYPE_ADD_ACCEPT = "TYPE_ADD_ACCEPT";
    public static final String TYPE_ADD_ACCEPTED = "TYPE_ADD_ACCEPTED";
    public static final String TYPE_ONE = "TYPE_ONE";
    public static final String TYPE_GROUP = "TYPE_GROUP";
    public static final String TYPE_SYSTEM = "TYPE_SYSTEM";
    public static final String MSG_TYPE_JOIN = "MSG_TYPE_JOIN";
    public static final String MSG_TYPE_LEAVE = "MSG_TYPE_LEAVE";
    public static final String MSG_TYPE_FORCE_LEAVE = "MSG_TYPE_FORCE_LEAVE";

    private String id;
    private String fromId;
    private String fromName;
    private String fromIcon;
    private String toId;
    private String toName;
    private String toIcon;
    private String type;//群聊私聊等消息类型
    private String msgType;//消息类型
    private String content;
    private Integer state; //标注消息已读未读
    private String sendTime;
}
